Optimal. Leaf size=47 \[ \frac{a^2 \sin (e+f x) \cos (e+f x)}{2 f}+\frac{1}{2} a x (a+4 b)+\frac{b^2 \tan (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0722403, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {4146, 390, 385, 203} \[ \frac{a^2 \sin (e+f x) \cos (e+f x)}{2 f}+\frac{1}{2} a x (a+4 b)+\frac{b^2 \tan (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4146
Rule 390
Rule 385
Rule 203
Rubi steps
\begin{align*} \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+b+b x^2\right )^2}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (b^2+\frac{a (a+2 b)+2 a b x^2}{\left (1+x^2\right )^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{b^2 \tan (e+f x)}{f}+\frac{\operatorname{Subst}\left (\int \frac{a (a+2 b)+2 a b x^2}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{a^2 \cos (e+f x) \sin (e+f x)}{2 f}+\frac{b^2 \tan (e+f x)}{f}+\frac{(a (a+4 b)) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac{1}{2} a (a+4 b) x+\frac{a^2 \cos (e+f x) \sin (e+f x)}{2 f}+\frac{b^2 \tan (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.15227, size = 52, normalized size = 1.11 \[ \frac{a^2 (e+f x)}{2 f}+\frac{a^2 \sin (2 (e+f x))}{4 f}+2 a b x+\frac{b^2 \tan (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.05, size = 51, normalized size = 1.1 \begin{align*}{\frac{1}{f} \left ({a}^{2} \left ({\frac{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }{2}}+{\frac{fx}{2}}+{\frac{e}{2}} \right ) +2\,ab \left ( fx+e \right ) +{b}^{2}\tan \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.50555, size = 72, normalized size = 1.53 \begin{align*} \frac{2 \, b^{2} \tan \left (f x + e\right ) +{\left (a^{2} + 4 \, a b\right )}{\left (f x + e\right )} + \frac{a^{2} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{2} + 1}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.488119, size = 134, normalized size = 2.85 \begin{align*} \frac{{\left (a^{2} + 4 \, a b\right )} f x \cos \left (f x + e\right ) +{\left (a^{2} \cos \left (f x + e\right )^{2} + 2 \, b^{2}\right )} \sin \left (f x + e\right )}{2 \, f \cos \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.42626, size = 77, normalized size = 1.64 \begin{align*} \frac{2 \, b^{2} \tan \left (f x + e\right ) +{\left (a^{2} + 4 \, a b\right )}{\left (f x + e\right )} + \frac{a^{2} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{2} + 1}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]